package com.jd.controller;

import com.jd.entity.GoodsEntity;
import com.jd.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/goodsController")
public class GoodsController {

    @Autowired
    IGoodsService goodsService;

    @RequestMapping(value="/getById")
    public GoodsEntity getById(GoodsEntity goodsEntity) {
        GoodsEntity goodsById = goodsService.getGoodsById(goodsEntity);
        return goodsById;
    }
}
